<template>
    <div>
      <div class="bgcolor"></div>
      <h4 class="title">--In货推荐--</h4>
      <div class="commend-list" v-for="item in items " :key="item.catory">
        <img class="title-img" :src="item.catory">
        <div class="list-item">
          <div class="item" v-for="(list,index) in item.list" :key="index">
            <img :src="list.img">
            <p class="item-title">{{list.title}}</p>
            <p class="item-price"><em>{{list.price}}</em>起</p>
            <div class="wrapper">
              <div class="inner" :style="{width:list.progress+ '%'}"></div><span>{{list.progress}}%</span>
            </div>
            <p class="item-jx" v-show="list.desctionKey">{{list.desctionKey}}</p>
          </div>
        </div>
      </div>
    </div>
</template>

<script>
export default {
  name: 'raiseCommend',
  data () {
    return {
      items: [{
        catory: '//img12.360buyimg.com/jrpmobile/jfs/t3406/210/2247820735/50952/86016eea/5846d8e7N20446dbd.png?width=750&height=200',
        list: [{
          img: 'https://img30.360buyimg.com/cf/s250x250_jfs/t14881/283/656508232/143980/9b606acf/5a33a171N18c9c80a.jpg',
          title: '双响炮蓝牙音箱',
          price: '29.00',
          progress: 152,
          desctionKey: '精选'
        }, {
          img: 'https://img30.360buyimg.com/cf/s250x250_jfs/t15529/308/632300625/135123/adb9c6d0/5a37676dNc31da9ea.jpg',
          title: '脑波相机',
          price: '998.00',
          progress: 25
        }]
      }, {
        catory: '//img12.360buyimg.com/jrpmobile/jfs/t3739/82/2244582797/54399/746c7d79/5846a953N66b67d05.png?width=750&height=200',
        list: [{
          img: 'https://img30.360buyimg.com/cf/s250x250_jfs/t11257/287/2281727659/55759/e00b90a/5a138f21N32dca834.jpg',
          title: '智能电动牙刷',
          price: '19.00',
          progress: 81
        }, {
          img: 'https://img30.360buyimg.com/cf/s250x250_jfs/t14209/293/662014092/61635/bba5c330/5a33a983N077cac56.jpg',
          title: '烟草加热电子烟',
          price: '258.00',
          progress: 55,
          desctionKey: '推荐'
        }]
      }, {
        catory: '//img12.360buyimg.com/jrpmobile/jfs/t3214/113/4408032436/61548/ce316eef/5846d310Ne93f00c9.png?width=750&height=200',
        list: [{
          img: 'https://img30.360buyimg.com/cf/s250x250_jfs/t15007/47/884045069/149879/17987250/5a3cb182N15868ea1.jpg',
          title: '赖公高淮封藏老酒',
          price: '99.00',
          progress: 199
        }, {
          img: 'https://img30.360buyimg.com/cf/s250x250_jfs/t14197/160/546457496/134173/4e1baccd/5a30ccc5Na44f7492.jpg',
          title: '泗洪花雕醉蟹',
          price: '58.00',
          progress: 222
        }]
      }]
    }
  }
}
</script>

<style lang="stylus" scoped>
  @import '../../assets/css/varibles.styl'
  @import '../../assets/css/mixins.styl'
  .bgcolor
    pdTop()
  .title
    jdTitle()
  .commend-list
   .title-img
    margin:.2rem auto
    width:100%
   .list-item
      display:flex
      padding:0 .1rem .2rem .1rem
     .item
      position:relative
      width:50%
      height:4rem
      overflow:hidden
      background:rgba(0,0,0,.02)
      text-align:center
      box-sizing:border-box
      margin:0 .1rem
      img
       width:2rem
       height:2rem
       margin:.4rem 0
      .item-title
       font-weight:bold
       line-height:1.2
      .item-price
        color:#999
        font-size:.24rem
       em
        font-weight:bold
        font-size:.32rem
        color:#ff3232
        margin-right:.1rem
        &:before
         content: '￥'
      .wrapper
       width:1.6rem
       margin:.3rem auto
       position:relative
       .inner
          height:.1rem
          background:#ff3232
          max-width:1.6rem
          position:absolute
          left:-.4rem
          top:0
       span
         font-size:.2rem
         color:#999
         position:absolute;
         right:-.3rem
         top:-.1rem
      .item-jx
       position:absolute
       top:0
       left:0
       font-size:.24rem
       color:#ff3232
       padding:.08rem
       background:rgba(6,6,6,.3)
</style>
